iterateNext

public abstract Optional<Node> iterateNext()

Moves the iterator to the next node in the result set and returns an Optional that contains the Node object referenced by the current iterator. When iteration is over, returns an empty Optional.

Throws

if the current result is not of an iterator type (see isIterator)

when the document this instance belongs to is closed